<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
        <title>Document</title>
        <script src = 'jquery-1.10.1.min.js'></script>
        <script src = 'jquery.cookie.js'></script>
        <script>
            /* 
                $.cookie()

                具体调用的格式
                $.cookie(name) 通过name取值
                $.cookie(name, value) 设置name和value
                $.cookie(name, value {
                    可选项
                    raw: true  value不进行编码
                        默认false value要进行编码的
                })
                $.cookie(name, null); 删除cookie
             */

             /* $.cookie("变种人", "X教授", {
                 expires: 7,
                 raw: true
             })

             $.cookie("赛亚人", "贝吉塔", {
                 expires: 30
             })

             $.cookie("海贼王", "路飞", {
                 expires: 1000
             }) */


             alert($.cookie("变种人"));
             alert($.cookie("赛亚人"));
             alert($.cookie("海贼王"));

             $(function(){
                 $("#btn1").click(function(){
                     $.cookie("赛亚人", null);
                     alert($.cookie("赛亚人"));
                 })
             })
        
        </script>
    </head>
    <body>
        <button id = 'btn1'>删除cookie</button>
    </body>
</html>